<!DOCTYPE html>
<!--
*
* Copyright (C) 2015, bitmovin GmbH, All Rights Reserved
*
* Created on: 2015-06-12 14:00:00
* Author:     bitmovin GmbH <dash-player@bitmovin.net>
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*
-->
<html lang="en">
<head>
  <title>libdash SDK</title>
  <meta charset="UTF-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" type="text/css" href="../style/demo.css"/>
  <link rel="stylesheet" type="text/css" href="../style/style.css"/>
  <link href='http://fonts.googleapis.com/css?family=Dosis' rel='stylesheet' type='text/css'/>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

  <script type="text/javascript" src="libdash/settings.js"></script>

  <!-- player -->
  <script type="text/javascript" src="https://bitmovin-a.akamaihd.net/bitdash/latest/bitdash.min.js"></script>

  <script>
    function goBack() {
      window.history.back();
    }
  </script>
</head>
<body>
<button id="back-button" onclick="goBack()">Back to the Menu</button>
<div class="container">
  <h1>Keyboard Controls</span></h1>

  <div class="content">
    <div class="player-wrapper">
      <div id="player"></div>
    </div>
    <div class="description">
      <h2 class="ca-main">Keyboard Controls</h2>
      <p>We have implemented several different commands for playback control via keyboard shortcuts:</p>
      <table>
        <tr>
          <td>
            <ul class="demo-description">
              <li>Play/Pause</li>
              <li>Mute/Unmute</li>
              <li>Enter Fullscreen</li>
              <li>Exit Fullscreen</li>
              <li>Seek + 5 seconds</li>
              <li>Seek + 10 seconds</li>
              <li>Seek - 5 seconds</li>
              <li>Seek - 10 seconds</li>
              <li>Volume + 5%</li>
              <li>Volume + 10%</li>
              <li>Volume - 5%</li>
              <li>Volume - 10%</li>
            </ul>
          </td>
          <td style="padding-left:20px;">
            <ul>
              <li><span>Space</span></li>
              <li><span>M</span></li>
              <li><span>F</span></li>
              <li><span>Esc</span></li>
              <li><span>right</span></li>
              <li><span>CTRL + right</span></li>
              <li><span>left</span></li>
              <li><span>CTRL + left</span></li>
              <li><span>up</span></li>
              <li><span>CTRL + up</span></li>
              <li><span>down</span></li>
              <li><span>CTRL + down</span></li>
            </ul>
          </td>
        </tr>
      </table>
      <p>Our implementation is open for additional keyboard shortcuts.</p>
    </div>
  </div>

</div>
<script type="text/javascript" src="js/ErrorMsgHelper.js"></script>
<script type="text/javascript">
  (function() {
    var createPlayer = function () {
      var conf = {
        key: window.libdashSettings.credentials.key,
        source: {
          dash: 'https://bitdash-a.akamaihd.net/content/MI201309180161/mpds/37340d42-5d62-49f5-a832-3615fac80a89.mpd',
          hls: 'https://bitdash-a.akamaihd.net/content/MI201309180161/m3u8s/37340d42-5d62-49f5-a832-3615fac80a89.m3u8',
          poster: 'https://bitdash-a.akamaihd.net/content/MI201309180161/poster-image.jpg'
        },
        style: {
          width: '100%'
        },
        events: {
          onError: function (data) {
            console.error("error: " + data.code + ": " + data.message);
          },
          onReady: function (data) {
            console.log(this.getVersion() + ' onReady: ', data);
          }
        }
      };

      var player = bitdash('player');
      player.setup(conf);
    };
    createPlayer();
  }());
</script>
</body>
</html>
